<?php
// SomeryC, a webcomic script by Zachary Weston Lewis
// Based on Somery by Robin de Graaf
// Copyright 2005-2006
// SomeryC is distributed under the Artistic License (see LICENSE.txt)
//
// 0.2.1-UPDATE.PHP > 02-06-2006

extract($_POST);
extract($_GET);

if (!$step) {
	echo "Click <a href=\"0.2.1-update.php?step=1\">here</a> to update your someryC database to 0.2.1.";
	exit;
}

include("config.php");
mysql_connect($sqlhost, $sqluser, $sqlpass);
mysql_select_db($sqldb);

$query = "ALTER TABLE `".$prefix."comics` 
	ADD `posttime` datetime NOT NULL NOT NULL default '0000-00-00 00:00:00' AFTER `time`";
$q = mysql_query($query) or die ("<p style=\"color:#cc0000;\">Updating settings table for somery 0.2.1 failed.</p>Host: $sqlhost / User: $sqluser / Database: $sqldb");

echo "<p style=\"color:#00A400;\">Success!</p><br />
	Your someryC database is updated to 0.2.1! Remove this update script and upload the files (if you haven't done so yet) and log in.";
?>